<template>
  <!-- 提示信息 -->
  <el-dialog
    :show-close="true"
    :close-on-click-modal="false"
    :visible.sync="show"
    title="提示"
    top="10vh"
    width="600px"
  >
    <div class="tc">
      <i class="el-icon-warning-outline f30 font-org" style="vertical-align: bottom;"></i>
      <span class="f14" style="line-height:30px;">{{ msg }}</span>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button size="small" @click.stop="$emit('update:shows', false)">取 消</el-button>
      <el-button size="small" type="primary" @click="submit">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: ["shows", "subFuc", "msg"],
  computed: {
    show: {
      get() {
        this.$emit("update:shows", this.setShow);
        return this.setShow;
      },
      set(v) {
        return (this.setShow = v);
      }
    }
  },
  watch: {
    shows(v) {
      this.setShow = v;
    }
  },
  data() {
    return {
      setShow: false
    };
  },
  methods: {
    submit() {
      this.subFuc();
      this.$emit("update:shows", false);
    }
  }
};
</script>

<style>
</style>